﻿using RabbitBus;
using RabbitMQ.Client;
using RabbitMQClient.Receive;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RabbitMQClient.Consumer
{
    /// <summary>
    /// 延时消息
    /// </summary>
    [QueueConsumer("DelayedConsumer", ExchangeTypeExpand.Delayed)]
    public class DelayedConsumer : ConsumerBase<DelayedReceive>
    {
        protected override void Receive(DelayedReceive eEvent)
        {
            Console.WriteLine($"执行DelayedConsumer成功,消息体为：{eEvent.Msg},接收时间为{DateTime.Now}");
        }
    }
}
